package com.xingkeduo.pojo.enums;

import lombok.Getter;

@Getter
public enum PackageUpdateType {

    Android(1, "Android"),
    Ios(2, "IOS"),
    OrderScreen(3, "下单屏"),
    IOS_TEST(4, "ios审核");

    private int val;
    private String desc;

    PackageUpdateType(int val, String desc) {
        this.val = val;
        this.desc = desc;
    }

    public static PackageUpdateType getEnum(int num) {
        for (PackageUpdateType s : PackageUpdateType.values())
            if (s.val == num) {
                return s;
            }
        return null;
    }

    public static boolean checkExitOrNotByValue(int val) {
        for (PackageUpdateType s : PackageUpdateType.values()) {
            if (s.val == val) {
                return true;
            }
        }
        return false;
    }
}
